package com.neusoft.neuiotms.common.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.domain.Pageable;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.neusoft.bizcore.web.dto.result.PageResultDTO;
import com.neusoft.bizcore.web.support.Searchable;
import com.neusoft.neuiotms.common.dto.AuditLogDTO;
import com.neusoft.neuiotms.common.service.AuditLogService;

import io.swagger.annotations.Api;

@Api(tags = "审计日志管理")
@RestController
@RequestMapping(value = "/api/w/auditlogs")
public class AuditLogController {

    @Autowired
    private AuditLogService auditLogService;

    @GetMapping("/p")
    public PageResultDTO<AuditLogDTO> search(final Pageable pageable, final Searchable searchable) {
        return PageResultDTO.success(this.auditLogService.search(pageable, searchable));
    }
}
